Parametric shape grammar interpreter

ABSTRACT

Parametric shape recognition is achieved through a decomposition of shapes into a hierarchy of subshapes ordered by their decreasing restrictions. Instances of each of the subshapes are individually located in the design shape and then reconstructed to form an instance of the entire shape. The basis for the hierarchy of subshapes can be specified by the designer or based on the default parameter relations that come from architectural and engineering knowledge. The levels of the hierarchy are defined so that the most constrained lines of a shape are those lines that the designer intended exactly. These most constrained lines have specified parametric relations to other line segments and those relations, if altered, will compromise the designer&#39;s intentions. Conversely, the lowest level of the hierarchy, which contains the least constrained line segments, only implies a specific connectivity between line segments, necessitating a vaster search. The parametric recognition of curved line shapes uses a two-step approach that first performs shape matching with an equivalent straight-line shape then checks those transformations for matching with the actual curved lines. This approach has advantages over just matching characteristic polygons in that it can match equivalent curves with differing characteristic polygons as well as emergent shapes.

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application is a continuation-in-part of U.S. patentapplication Ser. No. 09/493,903 entitled Parametric Shape GrammarInterpreter filed Jan. 28, 2000.

STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT

[0002] Certain of the research leading to the present invention wassponsored by the United States National Science Foundation undercontract No. DMI-9713782. The United States Government may have rightsin the invention.

BACKGROUND OF INVENTION

[0003] 1. Field of Invention

[0004] The present invention relates generally to shape grammars and,more particularly, to shape grammar systems and methods havingparametric shape recognition.

[0005] 2. Description of the Background

[0006] A shape grammar provides a formal method for the construction ofshapes. Knowledge is encoded within a grammar in the shapes that defineits rules. Synthesizing designs in the language defined by the grammaris a matter of applying rules beginning with an initial shape andfinishing with a terminating rule.

[0007] Shape grammars originated in the architectural field from workdone by Stiny and Gips (1972, Shape Grammars and the GenerativeSpecification of Painting and Sculpture. Information Processing 71,IFIP, North-Holland, Amsterdam) where they were used to capture thestyle of Queen Anne houses (Flemming, U. 1987. The Role of ShapeGrammars in the Analysis and Creation of Designs. Kalay Y. E. (ed.),Computability of Designs (New York: John Wiley), pp. 245-272.) andarticulate the rules of Frank Lloyd Wright's prairie house (Koning, H.and Eizenberg, J. 1981. The Language of the Prairie: Frank LloydWright's Prairie Houses. Environment and Planning B: Planning andDesign, 8:295-323), among other applications. Shape grammars can beclassified as a production system (Stiny and Gips 1980 need completesite) containing all of the necessary parts, objects, system definition,and an interpretive mechanism. A shape grammar is a set of rules, basedon shape, that is used to generate designs through rule applications.Rules take the form of a→b, where a and b both denote shapes. A rule isapplicable if the left-hand shape, a, can be found in the design shape,denoted c. If the rule is applied, the left hand shape is subtractedfrom the design and the right-hand shape is added to the design, denotedc−τ(a)+τ(b), where shapes a and b undergo a transformation τ accordingto the transformation required to make shape a a subshape of shape c.

[0008] Shape grammars, having their roots in architecture literature,have recently found application in engineering, such as in the design ofcoffeemakers, lathe process plans, roof trusses, andmicroelectromechanical systems (MEMS) resonators. Shape grammars may beconceptualized of as a type of expert system based on geometry. Shapegrammars, however, have succeeded in engineering applications wheretraditional expert systems have failed because of: (i) their directhanding of reasoning about geometry; (ii) their ability to operate on aparametric geometric representation; and (iii) their ability to supportemergence of shape. These advantages presage a future in which shapegrammars play an increasingly larger role in engineering design incomparison with the traditional expert systems.

[0009] Representation of products with a shape grammar is limited by thetechnology available to implement the grammar. A shape grammarinterpreter must provide the means to add, subtract, and performsubshape matching in order to implement a grammar. A system that canperform addition, subtraction, and recognition operations on shapes aswell as interface with a human user or automated function is called aninterpreter. Interpreters can implement any shape grammar whose shapesare limited to the restrictions implied by the shape operations. Shapegrammar interpreters provide a quick method to move a shape grammar frompaper to an implemented design synthesis tool. Krishnamurti, TheArithmetic of Shapes, Environment and Planning B: Planning and Design7:463484 (1980) described a method for non-parametric subshaperecognition of lines in two and three dimensions as well as shapeaddition and subtraction.

[0010] In the past, however, shape grammars have been limited by thedifficulty and time intensity in their implementations. Implementationshave not allowed for general parametric shape recognition. Engineeringshape grammars in particular have been restricted to limited,non-parametric shape recognition and often are hard-coded. Thesedrawbacks minimize much of the beneficial potential of shape grammars.

[0011] Accordingly, there exists a need for a shape grammar system thatuses shape recognition to provide, for example, an automated approach toproduct generation. There further exists a need for a shape grammarsystem in which engineering knowledge (geometry-based and otherwise) maybe incorporated into implementation design rules in order to drivedesign exploration and the generation of designs toward a desired end.

BRIEF SUMMARY OF INVENTION

[0012] In the present invention, parametric shape recognition isachieved through a decomposition of shapes into a hierarchy of subshapesordered by their decreasing restrictions. Instances of each of thesubshapes are individually located in the design or target shape andthen reconstructed to form an instance of the entire shape. The basisfor the hierarchy of subshapes can be specified by the designer or basedon the default parameter relations that come from architectural andengineering knowledge. The levels of the hierarchy are defined so thatthe most constrained lines of a shape are those lines that the designerintended exactly. These most constrained lines have specified parametricrelations to other line segments and those relations, if altered, willcompromise the designer's intentions. Conversely, the lowest level ofthe hierarchy, which contains the least constrained line segments, onlyimplies a specific connectivity between line segments, necessitating avaster search.

[0013] An extension can be made to the hierarchical method of parametricshape recognition that can be used for parametric recognition of curvedline shapes. This extension uses a two-step approach that first performsshape matching with an equivalent straight-line (distinct) shape andthen checks those transformations of the distinct shape for matchingwith the actual curved lines. This approach has advantages over justmatching characteristic polygons in that it can match equivalent curveswith differing characteristic polygons as well as emergent shapes.

[0014] The present invention allows for shape grammars, includingengineering shape grammars, to be implemented in a fraction of the timethat it currently takes to hard code them. Consequently, the presentinvention allows shape grammars to be adjusted, fine tuned, and adaptedto the changing design scenario presented to the rule writer. The shapegrammar interpreter of the present invention therefore possesses thefeatures desired in an engineering grammar implementation, includinggeneral parametric shape recognition, providing designers with thepossibility of exploring the promising potential of engineering shapegrammar systems. These and other benefits of the present invention willbe apparent from the detailed description hereinbelow.

DESCRIPTION OF THE FIGURES

[0015] For the present invention to be clearly understood and readilypracticed, the present invention will be described in conjunction withthe following figures, wherein:

[0016]FIG. 1 is a block diagram of a shape grammar system according toone embodiment of the present invention;

[0017]FIGS. 2 and 3 are diagrams of examples of line segments belongingto subshape groups according a default hierarchy of subshape groupsaccording to one embodiment of the present invention;

[0018]FIG. 4 is a block diagram of the process flow through theparametric shape grammar interpreter of the shape grammar system of FIG.1 according to one embodiment of the present invention;

[0019] FIGS. 5-11 are diagrams illustrating a method of shapedecomposition according to one embodiment of the present invention;

[0020] FIGS. 12-19 are diagrams illustrating a method of parametricshape recognition according to one embodiment of the present invention;

[0021] FIGS. 20-23 are diagrams illustrating a method of usingparametric shape recognition to apply a given shape grammar rule to agiven initial design shape according to one embodiment of the presentinvention; and

[0022] FIGS. 24-27 are diagrams illustrating a method of usingparametric shape recognition to apply a set of shape grammar rules to agiven initial design shape according to another embodiment of thepresent invention.

[0023]FIG. 28 is a shape consisting of three curved lines in which thedistinct points are marked.

[0024]FIG. 29 shows the curved line shape of FIG. 28, its distinctshape, and the correspondence between distinct lines and curved lines.

[0025]FIG. 30 shows two shapes consisting of curved lines and theirdistinct shapes, shapes p and q.

[0026]FIG. 31 illustrates a shape (a) to be searched for in shape c₀.

[0027]FIG. 32 illustrates two subshapes of the shape (a).

[0028]FIG. 33 illustrates the distinct shape the v₀ of shape c₀.

[0029]FIG. 34 illustrates matching shapes that result from the searchfor d₁ in v₀.

[0030]FIG. 35 illustrates matches which are stored in the set of shapesF₁.

[0031]FIG. 36 illustrates the curved line shapes corresponding to thedistinct shapes in F₁ as compared to (a)₁.

[0032]FIG. 37 illustrates two transformations of a₁ that pass the finecheck.

[0033]FIG. 38 illustrates a set of shapes V₁.

[0034]FIG. 39 illustrates a set of shapes F₂.

[0035]FIG. 40 illustrates a comparison of the curved line shapescorresponding to the distinct shapes in F₂ with a transformed version ofa₂.

[0036]FIG. 41 illustrates shapes passing the fine check andcorresponding distinct shapes which are placed in the set of shapes S₂.

[0037]FIG. 42 illustrates a set of shapes V₂ illustrating the resultingdifference in shapes after a subtraction process.

[0038]FIG. 43 illustrates the result of subtracting each member of V₂from v₀.

[0039]FIG. 44 illustrates the curved line shapes and matches of shape(a)in c₀.

[0040]FIG. 45 illustrates another target shape.

[0041]FIG. 46 illustrates the shield shape of interest.

[0042]FIG. 47 illustrates the equivalent target shapes with differentcharacteristic polygons.

[0043]FIG. 48 illustrates the distinct shape of the shield as anequilateral triangle.

[0044]FIG. 49 illustrates the distinct shape of the target as a set oftriangles.

[0045]FIG. 50 illustrates the symmetry of the shape as coming from thecurved lines because of the information lost in the distinct shaperepresentation.

[0046]FIG. 51 illustrates the distinct shape matches in the targetshape.

[0047]FIG. 52 illustrates a comparison of curved shapes for final matchcheck; (a) not a match (b) match.

[0048]FIG. 53 illustrates a two rule grammar for creating headlightdesigns.

[0049]FIG. 54 illustrates a shape created with the grammar in FIG. 53.The selected area is the starting point for the next step.

[0050]FIG. 55 illustrates two additional rules for generatingheadlights.

[0051]FIG. 56 illustrates a shape produced from all four rules, with theselected area being refined by the user.

[0052]FIG. 57 is an alternative headlight design with turn signals andparking lights.

[0053]FIG. 58 illustrates the 2002 Buick Rendezvous lights.

DETAILED DESCRIPTION OF THE INVENTION

[0054]FIG. 1 is a block diagram of a shape grammar system 10 accordingto one embodiment of the present invention. The shape grammar system 10includes a parametric shape grammar interpreter 12, including a shapedecomposition module 14 and a shape recognition module 16. The shapegrammar system 10 also includes a rule application module 18 and anintelligent rule selection module 20, which are in communication withthe parametric shape grammar interpreter 12. The shape grammar system 10may also include an input/output (I/O) interface module 22, asillustrated in FIG. 1. The shape grammar system 10, as describedhereinbelow, may be used to implement, for example, architectural shapegrammars, engineering shape grammars, and industrial design shapegrammars, with parametric shape recognition. The parametric shapegrammar interpreter 12 will be described herein as being used torecognize the left-hand shape of a shape grammar rule in the initialdesign shape(s) through the steps of decomposing the shape intosubshapes and progressively searching for parametric transformations ofthose subshapes, however, it should be recognized that the benefits ofthe present invention may be realized in any application requiringparametric shape recognition, and is not limited to shape grammarapplications.

[0055] The system 10 may be implemented using, for example, a computer,such as a workstation or a personal computer, a microprocessor, or anapplication specific integrated circuit (ASIC). The modules 14, 16, 18,20, and 22 may be implemented as software code to be executed by thesystem 10 using any type of computer instruction type suitable such as,for example, microcode, and can be stored in, for example, anelectrically erasable programmable read only memory (EEPROM), or can beconfigured into the logic of the system 10. According to anotherembodiment, the modules 14, 16, 18, 20, and 22 may be implemented assoftware code to be executed by the system 10 using any suitablecomputer language such as, for example, C or C++ using, for example,conventional or object-oriented techniques. The software code may bestored as a series of instructions or commands on a computer readablemedium, such as a random access memory (RAM), a read only memory (ROM),a magnetic medium such as a hard-drive or a floppy disk, or an opticalmedium such as a CD-ROM.

[0056] The parametric shape grammar interpreter 12 may perform theoperations necessary to determine whether any of a predefined set ofshape grammar rules may be applied to a particular shape (or set ofshapes). In addition, the interpreter 12 may determine how a particularrule may be applied to the shape(s). As described hereinbelow, theinterpreter 12 may perform these operations by decomposing, for example,the left-hand shape of a shape grammar rule into a group of subshapes,thereby allowing for any part of the shape to be transformed with anypossible transformation, although, as discussed hereinbefore, it is notlimited to such shapes. The interpreter 12 may perform these operationswith respect to, for example, a left-hand shape of a rule havingone-dimensional, two-dimensional or three-dimensional shapes. Inaddition, the left-hand shape may include, for example, straight linesegments, curved line segments, planes, or three-dimensional objects.Once the interpreter 12 determines whether a rule may be applied and howto apply the rule, whether the rule should be applied to the shape maybe determined, for example, by a user of the system 10 or theintelligent rule selection module 20. The rule application module 18 maythen apply the rule to the shape if so determined.

[0057] The shape decomposition module 14 decomposes a shape such as, forexample, the left-hand shape of a rule (the shape a in the rule a→b)into a group of subshapes contained in the shape. The groups may bedefined such that subshapes belonging to different groups do not share,for example, line segments for two-dimensional shapes. The group ofshapes may be ordered according to a hierarchy of, for example,decreasing restrictions or constraints for more efficient searching, asdescribed hereinbelow, although it is not necessary for the subshapegroups to be so ordered.

[0058] For an embodiment in which the subshape groups are orderedaccording to a hierarchy of decreasing constraints, the basis of thehierarchy of constraints may be, for example, defined by the designer orit may be a default hierarchy. A default hierarchy may be designed, forexample, to interpret the designer's intentions and preferences throughparticular features present in a shape which defines part of a shapegrammar rule. For example, the default hierarchy may be intended toseparate the parts of the left-hand shape of the rule that the designerspecified exactly from the parts of the shape that were intended as ageneral scheme.

[0059] For example, in defining a default hierarchy for an embodiment inwhich the left-hand shapes of the predefined shape grammar rules includeshapes having straight lines in a single plane, it is recognized thatthere is a limited set of transformations that can be applied to theshapes, such as translation, rotation, scaling (isotropic andanisotropic), and shearing. Of the possible transformations, some willdestroy certain features of the shape and some will not. For example, noamount of translation or rotation will destroy a specific feature suchas, for example, a right angle, a square, or an equilateral triangle.Shearing, however, will eliminate perpendicular intersections andsymmetry in a two-dimensional shape. In addition, anisotropic scalingwill also destroy symmetry unless the scaling is along or perpendicularto the line of symmetry. Isotropic scaling, on the other hand, does notaffect the symmetry of a shape.

[0060] In view of the properties of these transformations, an example ofa default hierarchy of subshapes may be defined as follows: TABLE 1Subshape Group Features Transformations s₁ 1) lines that intersectperpendicularly translation, and are the same length rotation, isotropic2) lines that are symmetric to more scaling than one lines that are notparallel s₂ 1) lines that intersect perpendicularly translation, 2)lines that are symmetric to one line or rotation, 3) more than one linesthat are parallel anisotropic scaling s₃ intersecting lines translation,rotation, anisotropic scaling, shearing s₄ none all

[0061] According to such a default hierarchy, subshape group s₁ consistsof the most constrained lines. Group s₁ contains the line segments thatintersect perpendicularly and are the same length. Additionally, the s₁group also contains any line segment that is symmetric to two or moreother line segments which are not parallel. Two examples of lines thatmeet the symmetry criteria of group s₁ are the sides of a square and thelegs of an equilateral triangle.

[0062] Group s₂ consists of the next most constrained lines, containingline segments that intersect perpendicularly. Any line segment that issymmetric to another line segment is also included in group s₂.Accordingly, group s₁ is a subset of group s₂. Some examples of s₂ linesthat are not also in group s₁ include the sides of a rectangle and thetwo equal legs of an isosceles triangle.

[0063] Group s₃ contains the line segments that intersect. Thus,subshape groups s₁ and s₂ are subsets of s₃. An example of three linesthat are in group s₃ and not s₁ or s₂ are the three line segments thatmake up the triangle illustrated in FIG. 2.

[0064] The line segments in group s₄ have no discernible spatialrelationship to any other line segments. Thus, the line segments ingroup s₄ are essentially those not found in s₁, s₂, and s₃. An exampleof line segments that may be found in group s₄ are illustrated in FIG.3.

[0065] The above-described default hierarchy is but one example of ahierarchy of subshapes ordered by decreasing constraints. According toother embodiments of the present invention, the shape decompositionmodule 14 may search the left-hand shape of a rule according to suchother subshape hierarchies. Such other hierarchies, as describedhereinbefore, may be defined by a user of the system 10, or may be adefault hierarchy making different assumptions about the intent of thedesigner through particular features present in a shape which definespart of a shape grammar rule. For example, according to one embodiment,the hierarchy may be based on an assumption that the intersection ofline segments at, for example, a right angle, is intended to represent aspecific design choice, and the intersection of line segments at anangle other than a right angle is intended to represent a generalscheme. According to other embodiments, the hierarchy may be based on anassumption that the intersection of line segments at, for example, sixtydegrees, is intended to represent a specific design choice, and theintersection of line segments at an angle other than sixty degrees isintended to represent a general scheme.

[0066] The shape recognition module 16 searches a shape, or a set ofshapes, for the subshapes belonging to the subshape groups according tothe transformations appropriate for that group. According to oneembodiment, parametric shape recognition may be accomplished by theshape recognition module 16 by repeating a three-step process for eachof the subshape groups of the decomposed left-hand shape of a rule. Thethree steps of the process may include: 1) finding subshapes in thedesign shape, 2) subtracting the subshapes from the design shape, and 3)identifying the connectivity between the subshape and the design shapeand between the subshapes of successive subshape groups by, for example,marking points of intersection with labels or weights to a) theoverlapping points of the decomposed left-hand shapes and also to b)points in the design equal in location to the transformed, identifiedpoints in the decomposed left-hand side shape. The process is begun witha first of the subshape groups, and progressively repeated for theothers. According to one embodiment, the subshape groups are of ahierarchical order of decreasing constraints, and the process is startedwith the most constrained group and progressively repeated with the nextmost constrained subshape group. Such an embodiment generally yieldsmore efficient searching.

[0067] For example, according to such an embodiment, the initial designshape is first searched for subshapes belonging to the most constrainedgroup. The subshape matches, found by applying the transformationsappropriate for that group, are defined as a set S. The subshapes in theset S are each subtracted from the initial design shape, producinganother set of shapes, denoted as the set C. According to oneembodiment, the subshapes of a decomposed shape will overlap each other,if at all, only at points because the definition of the hierarchicalgroups may require that the subshapes share no line segments. Thus, inorder to maintain the connectivity, and hence orientation, of thesubshapes, the connectivity between the shapes of sets S and C isidentified and maintained. The connectivity may be maintained, forexample, by identifying with labels or weights the overlapping points ofthe decomposed left-hand shapes and the points in the initial designcorresponding to the location of the transformed, identified points inthe decomposed left-hand shape.

[0068] The shape recognition module 16 may repeat this process for allof the subshape groups. The shape recognition process may end when allof the decomposed parts of the left-hand shape have been found or whenone of the shape searches finds no subshapes. The shape recognitionmodule 16 may then add each of the shapes, maintaining the connectivitybetween the shapes, for each of the subshape groups found in theoriginal shape to recognize the occurrences of the left-hand shape ofthe rule in the original design shape. Once the shape recognitionprocess is completed, as described hereinbelow, the rule may then beapplied.

[0069]FIG. 4 is a block diagram of the process flow through theparametric shape grammar interpreter 12 according to one embodiment ofthe present invention. The process begins at block 30 with adetermination of whether a rule remains in a set of shape grammar rulesfor which the left-hand shape of the rule has not been searched in theset of shapes C₀. The set of shape grammar rules may be defined andinput to the system 10 by a user of the system 10 and may be, forexample, architectural shape grammar rules, engineering shape grammarrules, or industrial design shape grammar rules. The set of rules mayinclude one or a multitude of rules. In addition, the set of shapes C₀may include one shape or a multitude of shapes. If the set does notcontain any such rules, the process flow continues to block 32, and theoperation of the shape grammar interpreter 12 is terminated.

[0070] Conversely, if the set does contain such a rule, the process flowcontinues to block 34, where the rule is selected to be applied, ifapplicable as determined by the parametric shape grammar interpreter 12,to the set of shapes C₀. From block 34, the process flow advances toblock 36, where a counter, denoted as is, is set to a value of one. Inaddition, at block 36, the set of shapes S₀, as discussed hereinbelow,is set to null.

[0071] From block 36, the process advances to block 38, where theleft-hand shape of the rule is decomposed into a number, denoted N, ofsubshape groups, denoted S_(i . . . N). The subshape groups may bedefined such that no subshapes of the decomposed left-hand shape share,for example, the same line segment. According to one embodiment, thesubshape groups S_(i . . . N) may be of a hierarchical order ofdecreasing constraints, such as the default hierarchy describedhereinbefore with respect to Table 1, or the hierarchy may be defined bya user of the system 10. According to other embodiments, the subshapegroups are not ordered according to a hierarchical order.

[0072] From block 38, the process continues to block 40, where it isdetermined whether the subshape group s_(i) is null. This corresponds toa determination of whether the left-hand shape of the rule includes asubshape belonging to the s_(i) subshape group. For example, where i=1,it is determined whether the left-hand rule includes a subshape of thes₁ group. If the group s_(i) is null, the process advances to block 42,where the set of shapes S_(i), as described further hereinbelow, is setto null. In addition, at block 42, the set of shapes C_(i), as describedhereinbelow, is set to the same as the set C_(i−1).

[0073] From block 42, the process flow advances to block 43, where it isdetermined whether i=N. If i does not equal N, then the process flowcontinues to block 44, where the counter (i) is incremented by one, andthe process flow returns to block 40 such that it may be determinedwhether the subshape group s_(i+1) is null. Conversely, if it isdetermined that i equals N, then the process flow advances to block 59.

[0074] If at block 40 it is determined that the s_(i) subshape group isnot null, the process flow continues to block 46, where the set ofshapes C_(i−1) is searched for subshapes belonging to the subshape groups_(i). For example, where i=1, the set of shapes C₀ is searched forsubshapes belonging to the subshape group s₁. Accordingly, as thecounter i is incremented during the process flow, as describedhereinbelow, the set of shapes to be searched (C_(0 . . . N−1)) will beprogressively searched for subshapes belonging to the other subshapegroups until all the subshape groups are exhausted.

[0075] The set of shapes C_(i−1) is searched for subshapes belonging tothe group s_(i) using the parametric transformations appropriate forthat group. For example, for the default subshape group describedhereinbefore with respect to Table 1 where i=1, the set of shapes C₀ issearched for subshapes of the group s₁ using translation, rotation, andisotropic scaling. Accordingly, where i=2, the set of shapes C₁ issearched for subshapes of the group s₂ using translation, rotation, andanisotropic scaling, and so on for the remaining subshape groups s₃ ands₄.

[0076] From block 46, the process continues to block 48, where it isdetermined whether a parametric transformation of a subshape belongingto the group s_(i) is found in the set of shapes C_(i−1). For example,where i=1, it is determined whether a parametric transformation of asubshape belonging to the group s₁ is found in the set of shapes C₀. Ifa subshape belonging to the group s_(i) is not found in the set ofshapes C_(i−1), the process flow returns to block 32, where theoperation of the parametric shape grammar interpreter 12 is terminated.The process flow is terminated at this point because a subshapebelonging to the group s_(i) is not found in the set of shape C_(i−1),and if the subshape group s_(i) is not null, then the left-hand shape ofthe selected rule cannot be found in the set of shapes C₀. Conversely,if at block 48 a parametric transformation of a subshape belonging tothe group s_(i) is found, then the process continues to block 50.

[0077] At block 50, a set of shapes S_(i) is generated. The set ofshapes S_(i) includes the parametric transformations of the subshapes ofthe group s_(i) found in the set of shapes C_(i−1) using thetransformations appropriate for that subshape group. For example, wherei=1, a set of shapes S₁ is generated which includes the parametrictransformations of the subshapes of the group s₁ found in the set ofshapes C₀. For subshape groups that are null, the set S_(i) is set to bea null, as described hereinbefore with respect to block 42.

[0078] Continuing to block 52, a set of shapes C_(i) is generated whichcorresponds to the subtraction of the set of shapes S_(i) from the setof shapes C_(i−1). Thus, for example, where i=1, at block 52 the set ofshapes C₁ is generated which corresponds to the subtraction of the setof shapes S₁ from the set of shapes C₀. For subshape groups that arenull, the set C_(i) is set to be the same as C_(i−1), as describedhereinbefore with respect to block 42.

[0079] From block 52, the process continues to block 54, where the setof shapes S_(i) are added to the sum of sets S_(i−1, . . . , 0). The setof shapes S_(i) is added to the previous sum such that the connectivityof the decomposed left-hand shapes is maintained using, for example, theconnectivity technique described herein. Thus, for example, where i=1,the set of shapes S₁ is added to the set of shapes S₀, which was set tonull as described hereinbefore with respect to block 36. Accordingly,the sum of the sets S₁ and S₀ will be the same as S₁. The set S₁ willalso be null if the group s₁ is null. Conversely, if s₁ is not null andif at block 48 parametric transformations of the subshapes belonging tothe group s₁ are found in the set C₀, then the set S₁ will include thoseshapes corresponding to those parametric transformations. Accordingly,where i=2, the sum of sets S_(2,1,0) will correspond to the sum of setsS₂ and S₁.

[0080] From block 54, the process flow continues to block 56, where itis determined whether i=N. This determination corresponds to a check ofwhether parametric transformations of the subshapes of each of thesubshape groups s_(i . . . N) that are not null have been searched for.

[0081] If i does not equal N, then the process flow advances to block58, where the connectivity of the subshapes of set S_(i) relative to theset of shapes C_(i), as well as the relative connectivity between theother parts of the decomposed left-hand shape, are determined. Therelative connectivity of the parts of the left-hand shape may bedetermined by, for example, identifying with labels or weights theoverlapping points of the subshapes of groups s₁, s₂, . . . , s_(i), andthe subshape of the next group that is not null. In addition, the pointsin the shapes of set C_(i) corresponding in location to the transformed,identified points in the groups s₁, s₂, . . . , s_(i), may also beidentified with, for example, labels or weights. From block 58, theprocess flow returns to block 44, where the counter (i) is incrementedsuch that the shape recognition function may resume with the subshapesof the next subshape group.

[0082] It should be recognized that prior to advancement of the processflow to decision block 56, the set of shapes C_(i) has been generated ateither block 42 or 52, as described hereinbefore. At block 42, the setC_(i) is set to be the set C_(i−1) because the set s_(i) is null.Accordingly, when the process flow returns to block 46 (assuming thegroup s_(i+1) is not null), in essence the set of shapes C_(i−1) will besearched for the subshapes of group s_(i+1). Conversely, if at block 48,a parametric transformation of a subshape of the group s_(i) was foundin the set of shapes C_(i−1), then the set of shapes C_(i) is generatedat block 52, as described hereinbefore, as the set of shapes S_(i)subtracted from the set of shapes C_(i−1). Accordingly, when the processflow continues to block 46, the set of shapes S_(i) subtracted from theset of shapes C_(i−1) (i.e., the set of shapes C_(i)) will be searchedfor subshapes of the group s_(i+1) (again, assuming the group s_(i+1) isnot null).

[0083] If at block 56 it is determined that i=N, which corresponds to adetermination that the presence of parametric transformations ofsubshapes belonging to each of the subshape groups s_(i . . . N) whichare not null have been searched for, then the process flow proceeds toblock 59, where the sum of sets S_(i . . . N), as determined at block54, corresponds to the parametric transformations of the left-hand shapeof the selected rule found in the set of shapes C₀.

[0084] According to other embodiments of the present invention, theinterpreter 12 may recognize parametric transformations of the left-handshape of a selected rule according to process flows different than thatillustrated in FIG. 4. For example, according to another embodiment,rather than adding the set of shapes S_(i) to the sum of S_(i−1 . . . 0)at block 54 prior to the determination of whether i=N at block 56, thesets S_(i . . . N) may be summed together in one step after thedetermination of whether i=N to recognize the parametric transformationsof the left-hand shape of the rule in the set of shapes C₀.

[0085] Once the parametric transformations of the left-hand shape of aselected rule is recognized in the set of shapes C₀ by the parametricshape grammar interpreter 12, as described hereinbefore with referenceto FIG. 4, it may be determined whether the rule is to be applied to theset of shapes C₀. This determination may be made, for example, by anoperator of the system 10 or the intelligent rule selection module 20.If a particular application of the rule is selected, the ruleapplication module 18 may then apply the rule by subtracting thetransformation of the left-hand shape of the rule from the initial shapeand adding a transformation of the right-hand shape. After the rule isapplied, the process flow illustrated in FIG. 4 may be repeated with theselection of a different rule from the set of predefined rules to beapplied to the resulting shape (or shapes) from the application of theprior rule. If it is determined that the rule is not to be applied, theprocess flow illustrated in FIG. 4 may also be repeated with theselection of a new rule from the set of predefined rules to be appliedto the original shape or shapes (C₀). According to another embodiment,the rule application module 18 may apply the rule for alltransformations of the left-hand shape found in the set of shapes C₀,and the process may be repeated for all of the resulting shapes, thusproducing all possible permutations resulting from application of thepredefined set of rules in the initial design shape(s).

[0086] The I/O interface module 22 may be used to input data, such asthe shape grammar rules, and to output data, such as the set of rules,the transformations of the left-hand shape of a particular rule found ina shape, and the shapes resulting from the application from a particularrule. The I/O interface module 22 may input and output the data, forexample, in text and/or graphical form. The I/O interface module 22 maydisplay data via a display device (not shown) in communication with theI/O interface module 22.

[0087] Thus, the parametric shape grammar interpreter 12 of the presentinvention permits parametric shape recognition of the left-hand shape ofa shape grammar rule in an initial design shape(s). Unlike previousinterpreters that are limited to Euclidean transformations (translation,rotation, and scaling) that can only be applied to whole shapes, theparametric shape grammar interpreter 12 can search for generalparametric features of a subshape generated through decomposition of ashape, thus allowing for separate treatment of each subshape.

[0088] FIGS. 5-11 provide a shape decomposition example using theexample default hierarchy of subshape groups defined hereinbefore withrespect to Table 1. Consider the shape to be decomposed (such as theshape a in the rule a→b) to be that illustrated in FIG. 5. To recognizethe transformations of the subshapes of the groups S₁₋₄, as definedhereinbefore, the lines of symmetry in the shape of FIG. 5 may first bedetermined. These lines of symmetry are illustrated in FIG. 6 as dashedlines. As illustrated in FIG. 6, each line of the square 60 is symmetricwith the two lines of the square 60 that it intersects. In addition,each of the lines of the triangle 62 is symmetric with more than oneline. Accordingly, these subshapes satisfy the requirements of thesubshape group s₁, and can be subtracted from the example shape,resulting in the shape shown in FIG. 7, for which the subshapes of groups₂ may be searched.

[0089] The resulting shape, shown in FIG. 7, contains two lines that aresymmetric to only one other line. Additionally, there are twoperpendicular intersections, comprised of three line segments, thatsatisfy the requirements of s₂, as illustrated in FIG. 8. Accordingly,this shape may be subtracted from the shape shown in FIG. 7, resultingin the shape shown in FIG. 9, which may be searched for subshapes of thegroup s₃.

[0090] The s₃ subshape illustrated in FIG. 10 is present in the shape ofFIG. 9. As illustrated, the s₃ subshape is simply the intersecting linesegments. Accordingly, this subshape may be subtracted from the shape ofFIG. 9, resulting in the shape shown in FIG. 11, which corresponds tothe subshapes comprising the s₄ group.

[0091] FIGS. 12-19 provide an example of parametric shape recognition,using the example default hierarchy defined hereinbefore with respect toTable 1, to recognize the presence of parametric transformations of theleft-hand shape (a) of the rule (a→b) in a design shape (C₀). Considerthe rule to be the rule a→b illustrated in FIG. 12, and consider theinitial design shape (C₀) to which the rule is to be applied to be theshape illustrated in FIG. 13. As described hereinbefore, in order toapply the rule a→b to the design shape C₀, the left hand shape (a) ofthe rule must be found to be a parametric subshape under varioustransformations (τ) of the shape C₀. Using the default hierarchy definedhereinbefore with respect to Table 1, the shape a may be decomposed intothe four subshapes where a=s₁+s₂+s₃+s₄.

[0092] For the shape a shown in FIG. 12, using the default hierarchydefined hereinbefore with respect to Table 1, the subshapes comprisinggroups s₁ and s₂ are shown in FIG. 14, and the groups s₃, s₄ are null.The shape recognition process, as described hereinbefore, may begin withthe most constrained subshape group that is not null and skipped anyless constrained groups that are null. Such an embodiment produces amore efficient shape recognition process because the more highlyconstrained shapes have fewer possible transformations. Thus, for therule shown in FIG. 12, the s₁ subshape is searched first, and then thes₂ subshape is searched.

[0093] Permissible transformations of the s₁ subshape may be foundmultiple times in the shape a, resulting in four instances of s₁subshapes in this example. These transformations, as describedhereinbefore, are defined as the set S₁, and are shown in FIG. 15. Thefour shapes of S₁ are equal but are found differently within the initialdesign shape by the rotation of s₁ subshape four different ways (0°,90°, 180°, and 270°). The dots in FIG. 15 are to show the varioustransformations of the s₁ subshape found in the shape a. Having foundthe set of shapes S₁, the set of shapes C₁ is generated, which is theresult of the set of shapes S₁ subtracted from C₀. The set of shapes C₁is shown in FIG. 16.

[0094] By definition of the subshape groups s₁, s₂, s₃, and s₄, it canbeen seen that no two groups will share any common line segments. Theywill, however, share common line segment end points. Accordingly, therelative connectivity of the shapes of groups s₁ and s₂, as well as therelative connectivity of the transformed instance of s₁ and the set ofC₁ shapes may be identified, as illustrated in FIG. 17.

[0095] Next, as described hereinbefore, the set of shapes C₁ is searchedfor the next most constrained subshape group, which for this example, isthe s₂ group. As can be appreciated, two permissible transformations ofthe s₂ subshape may be found in each of the shapes of C₁. The set of thesubshapes thus define the set S₂. Next, as described hereinbefore, theset of shapes S₂ is subtracted from the set of shapes C₁ to define theset of shapes C₂. Next, the intersection points between the markedshapes S₂ and the corresponding shapes C₂ are identified.

[0096] The sets S₁ and S₂ are then added such that their connectivity ismaintained to produce the subshapes illustrated in FIG. 18. Because thegroups s₃ and s₄ are null, as described hereinbefore, the shapesillustrated in FIG. 18 represent the parametric transformations of theleft-hand shape a of the rule a→b (illustrated in FIG. 12) found in theinitial design shape C₀ (illustrated in FIG. 13). The two possibleapplications of the rule may then be applied to the shape C₀ to producethe shapes illustrated in FIG. 19.

[0097] FIGS. 20-23 provide an example of parametric rule application.Consider the rule to be applied as the rule a→b illustrated in FIG. 20,and the initial design shape C₀, to which the rule is to be applied, asthe shape illustrated in FIG. 21. Using the default hierarchicalsubshape groups described hereinbefore with respect to Table 1, it canbe recognized that the left-hand shape (a) of the rule has constraintsthat limit the parametric shape search to perpendicular intersections.This corresponds to group s₂. Twelve permissible transformations of thes₂ shape may be found in the shape C₀, three of which are shown in boldin FIG. 22. Because the subshape groups s₁, s₃, and s₄ are null for thisexample, the sum of sets S₁₋₄ includes only the twelve transformationsof the s₂ subshape found in the shape C₀. Accordingly, the shape a maybe recognized twelve times in the shape C₀, with application of the rulefor each of the transformations resulting in the shapes illustrated inFIG. 23.

[0098] FIGS. 24-27 provide another example of a parametric shape grammarapplication using the default hierarchy of subshape groups describedhereinbefore with respect to Table 1. For the example, the set of rulesillustrated in FIG. 24 comprise the predefined shape grammar rules, andthe initial design shape is the shape illustrated in FIG. 25. Uponexamining each of the rules, it can be recognized that the left-handshapes of each rule fall into the s₃ group because of the lack ofsymmetry and perpendicular intersections. Therefore, in general, each ofthe rules may be applied if a shape corresponding to a permissibleparametric transformation of the left-hand shape of any of the rules isrecognized in the initial design shape. For example, rule 1 isapplicable if any triangle can be recognized, and rule 4 may be appliedif any five-sided polygon can be recognized. The progression of shapesillustrated in FIG. 26 depict the application of a series of these rulesusing the parametric shape grammar interpreter 12 for shape recognition.For the shapes illustrated in FIG. 26, the subshape to which theindicated rule is to be applied is highlighted in bold. The progressionof rule application may continue, such as by randomly choosing theapplicable rules as well as the parameters, producing final designshapes such as those illustrated in FIG. 27.

[0099] An extension can be made to the hierarchical method of parametricshape recognition described above for parametric recognition of curvedline shapes. This extension uses a two-step approach that first performsshape matching with an equivalent straight-line shape then checks thosetransformations for matching with the actual curved lines. This approachhas advantages over just matching characteristic polygons in that it canmatch equivalent curves with differing characteristic polygons as wellas emergent shapes.

[0100] The equivalent straight-line shape is referred to as the distinctshape, as it is a collection of lines connecting distinct points fromthe curved shape. The set of distinct points, which can be defined bythe user, includes points such as intersections between curves and curveendpoints. FIG. 28 is a shape consisting of three curved lines in whichthe distinct points are marked. The connectivity of the distinct pointsis then represented by a set of straight-line segments, which correspondto a curved line or a portion of a curved line, and combine to form thedistinct shape. FIG. 29 shows the curved line shape of FIG. 28, itsdistinct shape, and the correspondence between distinct lines and curvedlines.

[0101] A hierarchy is again established that specifies the spatialrelations and appropriate transformations at each of its levels.However, this method differs from the previously described method inthat the types of transformations used during the matching of thedistinct shape are derived from the spatial relations of the curvedshape and not the distinct shape itself. This is done because while thedistinct shape serves as an equivalent of the curved shape for theinitial coarse matching, it may misrepresent the spatial relationsbetween the curved lines. For example, FIG. 30 shows two shapesconsisting of curved lines and their distinct shapes, shape p and shapeq. Shape p has three lines of reflective symmetry while shape q has onlyone line of reflective symmetry. However, they share the same distinctshape, an equilateral triangle. If the types of transformations werechosen based on the distinct shape, a search for shape q may result inan incorrect set of matches. Hence, the types of transformations for thecoarse matching are derived from the curved line shape. This is shown ina sample hierarchy in Table 2. The two stage matching process isdemonstrated through an example, and then a general approach is given aspseudo-code. TABLE 2

[0102] In FIG. 31, shape (a) is to be searched for in shape c₀. Shape(a)can be decomposed into a set of n subshapes and searched forindividually, maintaining the connectivity of the subshapes throughoutthe search with labels, as was previously outlined for straight lines.In this example, shape (a) has two subshapes, a₁ and a₂ as shown in FIG.32. The search begins by finding the distinct shapes d_(i) for each ofthe subshapes a_(i) and the distinct shape v₀ of shape c₀. For thissearch d₁ and d₂, the distinct shapes for subshapes a₁ and a₂respectively, are shown in FIG. 32 and distinct shape v₀ of shape c₀ isshown in FIG. 33. Shape v₀ is placed in the set of shapes V₀. Thisnotation change is useful when the matching process is described as aloop.

[0103] Beginning with the most highly constrained level of thehierarchy, which is d₁ in this example, a search is performed forinstances of d_(i) in each shape vε{V_(i−1)},

[0104] F_(i)={τ(d_(i))≦v|∀τετ_(i)}.

[0105] The set of transformations, τ, used in this search comes fromthose specified by the user in the hierarchy. In this example, shape d₁is searched for in shape v₀ (the only shape in V₀) using the set oftransformations τ₁ that are indicated as appropriate for a₁ by the userin the hierarchy. The hierarchy of spatial relations, andtransformations for this problem, are shown in Table 3. The searchreveals two matching shapes with six different orientations of labeledpoints each. The two matching locations (without labeled orientation)are shown in bold in FIG. 34. The search can be restricted further bynoting that the labeled distinct points of shape d₁ must be matched withdistinct points in v₀ that are the intersecting point of more than twoline segments. The additional information reduced the number of matchesto four total, which are stored in the set of shapes F₁ and are shown inbold in FIG. 35. TABLE 3 Subshape Group Spatial RelationsTransformations Curved Shape s₁ reflective symmetry with moretranslation, rotation, than one line isotropic scaling s₂ reflectivesymmetry with one translation, rotation, line anisotropic scalingDistinct Shape s₁ translation, rotation, isotropic scaling s₂translation, rotation, positive anisotropic scaling

[0106] Each shape f in the set F_(i) (instances of d_(i) in V_(i−1))corresponds to a set of curved lines in shape c₀, which collectivelyform the curved line shape f′. The corresponding curved lines, f′, arecompared with subshape τ(a_(i)), where the transformation τ is the sameset of transformations used to match d_(i). This is the fine stage ofmatching. For each successful fine match f′, the corresponding distinctshape f is placed in the set S_(i). Returning to the example, the curvedline shapes corresponding to the distinct shapes in F₁ are compared toτ(a₁) in FIG. 36. There are two transformations of a₁ that pass the finecheck, and the corresponding distinct shapes are placed in the set S₁(FIG. 37).

[0107] The fine check can be performed using a number of differentmethods. Three of these methods are determining curve segmentequivalence by comparing control polygons, sampling points along thecurves, and determining tangency of the curve segments. Control polygonscan be compared for equivalence if the number of control points definingeach curve is the same. Control points can be added to the polygon withfewer points without changing the curve in order to allow forcomparison. Adding points and comparing control polygons are simple andefficient processes. Sampling points is a simple method of determiningequivalence by checking for the existence of a set of points on bothlines. However, point sampling may lead to inaccuracies if aninsufficient number of points is selected. If both curve segments aretangent to each other along their lengths then the two segments areequivalent. Determining tangency between two curves can be performedusing, for example, the technique described by Sederberg and Nishita(1990) “Curve intersection using Bezier clipping” Computer-Aided Design22 538-549. Their method involves determining a point or region wheretangency occurs by clipping away portions of the curves not tangent toeach other. If this method is unable to clip any portion of eithercurve, then the two segments are equivalent. Sederberg and Nishita'salgorithm is efficient, but comparing control points may be the moststraightforward and efficient method for determining curve segmentequivalence.

[0108] Each shape s in S_(i) is subtracted from shape v in V_(k−1) forwhich it is a subshape and the shared points between the difference ands are labeled to maintain connectivity,

[0109] ∀sεS_(i), V_(i){g(s, v−s)},

[0110] where g(y, u) is the operation that transfers the connectivitylabels from shape y to shape u. The labels are of the form x_(j,m) wherej is the less constrained subshape grouping number and m is an index.This is the same labeling technique described in the straight linematching section. The resulting labeled shapes are stored in the setV_(i). In the example, each shape in S₁ is subtracted from shape v₀ (theonly shape in V₀) and the shared points between the difference and theshapes in S₁ are labeled as such. The resulting labeled shapes arestored in the set V₁ (FIG. 38).

[0111] The general method is used iteratively until all subshapes of adecomposed shape have been searched for or until one of the searchesproduces no results. If one of the subshape searches is unsuccessfulthen there is no instance of shape (a) in c₀. If the search issuccessful for each subshape then instances of shape (a) in c₀ areproduced by subtracting each shape in V_(n) from v₀ and finding thecorresponding curved lines of the difference.

[0112] The example continues by searching for distinct shape d₂ in eachshape in V₁ using the appropriate transformations from the givenhierarchy. There are four matches, which comprise the set of shapes F₂(FIG. 39). The curved line shapes corresponding to the distinct shapesin F₂ are then compared with a transformed version of a₂ (FIG. 40). Twoof these shapes pass the fine check and the corresponding distinctshapes are placed in the set of shapes S₂ (FIG. 41). Each shape in S₂ isthen subtracted from the shape in V₁ for which it is a subshape. Theresulting difference of shapes is stored in the set V₂ (FIG. 42).

[0113] There are no additional subshapes of shape (a) so the search isterminated. The matching instances of shape (a) in c₀ are the curvedline shapes corresponding to the difference of distinct shape v₀ andeach shape in V₂. The result of subtracting each member of V₂ from v₀ isshown in FIG. 43. The corresponding curved line shapes and matches of(a) in c₀ are shown in FIG. 44. The general curved line matching processis described in pseudo-code form in the Table 4. The pseudo-coderepresents software that would be employed to configure a generalpurpose computer to create specific logic circuits which correspond toany claimed “means” limitations, but are not necessary the only supportfor such “means” limitations appearing in any claims. TABLE 4 Notes forpseudo-code: Lower case represents a single shape UPPER CASE representsa set of shapes Given shape a, find an instance of shape a in shape c₀by using a user-defined shape hierarchy of n levels Determine shape d,the distinct shape of shape a Decompose shape a into n subshapes wherea_(i), i=1...n, corresponds to subshape grouping s_(i) from the user'shierarchy and shape d_(i) is the distinct shape  corresponding tosubshape a_(i) Shape c₀ is placed in the set of shapes C₀ Shape v₀, thedistinct shape of shape c₀, is placed in the set of shapes V₀ m=0 Fori=1 to n For j = i+1 to n Mark shared points between d_(j) and d_(i)with label x_(j, m) m=m+1 For k =1 to n For each shape v that is amember of the set of shapes V_(k−1): Search for instances of shape d_(k)in shape v using t_(k), the transformations specified as appropriate fora_(k) Store all instances of d_(k) in v whose labels at levels 1...kmatch in F_(k) For each distinct shape f that is a member of the set ofdistinct shapes F_(k): Shape f′ is the curved lines in c₀ correspondingto f If f′=t_(k)(a_(k)) Put f in set of shapes S_(k) For each shape sthat is a member of the set of shapes S_(k): v′ = v − s Copy the sharedpoint labels between v′ and s Put v′ in set of shapes V_(k) If k = n Foreach shape v_(k) that is a member of the set of shapes V_(k): Aninstance of the original shape is equal to the shape corresponding totne distinct shape v₀ − v_(k)

[0114] Another example of a curve matching process is shown in FIG. 45.FIG. 45 contains the target shape, three intersecting circles. Thetriangle around each circle is the characteristic polygon used to definethe circle. The shape being searched for is the shield shape in FIG. 46.Again the straight lines represent the characteristic polygon. Matchingthe shield within the intersecting circles requires matching the actualcurves and not simply the characteristic polygon because the linesegment that we wish to match in the target does not have a controlpolygon specifically for it and the representation of the arcs thatcompose the circle is not unique. FIG. 47 contains two sets ofintersecting circles equal to the one in FIG. 45 but with differentcharacteristic polygons.

[0115] Finding the shield shape begins by determining the distinctpoints in the shield and the target shapes. Distinct points arise fromline segment intersections and endpoints. Further specificity concerningthe type of the intersection will reduce the computation time. From thedistinct points, distinct shapes can be formed which match the topologyof the curved shape and contain at least as much symmetry as the curvedshape. The distinct shape of the shield is shown in FIG. 48 and thedistinct shape of the target in FIG. 49.

[0116] The shield shape can now be decomposed into a hierarchy ofsubshapes in order that specific shape features are preserved during thematching. The shape features are determined by examining the curvebecause the distinct shape may mask the lack of symmetry actuallypresent in the shape. A shape whose distinct shape is the same as FIG.46 but whose curved lines lack symmetry is shown in FIG. 50. A simplehierarchy for curved shape matching is seen in Table 5. This hierarchyserves as a default approach that handles symmetry but not issues ofcontinuity beyond endpoint sharing between endpoints. Other hierarchiescan be created by the grammar rule writer, as the rules are beingcreated to meet the shape matching needs of the grammar. TABLE 5Hierarchy level Spatial relations preserved Transformations allowed 1Symmetry in more than one Translation, rotation, isotropic directionscaling 2 Symmetry in one direction Translation, rotation, an- isotropicscaling 3 Topological match and Decompose shape into matching based onuser secondary hierarchy for criteria point matching 4 Indeterminatecases Requires a rule of thumb, labels, or some other means to eliminateambiguity

[0117] The multiple instances of symmetry in the distinct shape(equilateral triangle) place the shield shape in the most constrainedlevel of our sample hierarchy which dictates that translation, rotation,and uniform scaling be used for shape matching. Matches of the distinctshape are found in two places with three orientations each (FIG. 51) inthe target. As the final check for shape matching, the curved segmentsthat share common distinct points with the straight lines of thedistinct shape are compared to the corresponding curved lines of thetarget shape. FIG. 52 shows an overlay of the shield shape on thepotential match in the target. It is apparent that the curves of theshield are not a subset of the curves of the target shape in FIG. 52awhile they are a match in FIG. 522.

[0118] Determining whether the curves of the shield are collinear withcurves of the target can be done in several ways. The curved linesegments in question in the target shape can be re-parameterized,breaking the curve into segments equal to those in the shield. Thecontrol polygons of the two curved line segments can then be comparedfor equivalence. Another possibility is comparing the location andexistence of curve features (radius of curvature, inflection points) orchecking for a point on line match at a few locations on the linesegment.

[0119] Shape grammars can benefit from both automated generation andinteraction with a human user. Automation provides the means forenumerating possible designs, which act as a springboard for somecreative exercises. A grammar for generating headlight designs wascreated. The headlight grammar began as a simple two rule grammar (FIG.53) implemented with the curved shape interpreter.

[0120] If the grammar were permitted to run randomly, a field ofheadlight designs (FIG. 54) would be produced. The user could thenobserve and select interesting patterns and emerging shapes and usethese shapes to create new rules (FIG. 55). A portion of the field canbe selected as a starting point for the augmented grammar. Generationcontinues, producing new shapes shown in FIG. 56. A section is thenchosen from the design and is manually trimmed and refined (FIG. 57).The new headlight design is presented as an alternative to theheadlights on the existing 2002 Buick Rendezvous (FIG. 58).

[0121] While the present invention has been described in the environmentof a shape grammar, it will be apparent to those of ordinary skill inthe art that the shape recognition method and apparatus disclosed hereinmay by employed in environments other than shape grammars. Those ofordinary skill in the art will also recognize that many modificationsand variations of the present invention may be implemented. Theforegoing description and the following claims are intended to cover allsuch modifications and variations.

What is claimed is:
 1. A method, comprising: decomposing a first shapeinto at least one subshape; identifying instances of said at least onesubshape in a target shape; and determining if said first shape ispresent in said target shape based on said identifying.
 2. The method ofclaim 1 additionally comprising defining an equivalent straight lineshape for each curved line in said first shape before decomposing saidfirst shape.
 3. The method of claim 2 additionally comprising, for anyidentified instances of a subshape corresponding to an equivalentstraight line shape, confirming said identified instances with saidcurved line.
 4. The method of claim 3 wherein said decomposing includesdecomposing said first shape into a plurality of subshapes, saidplurality of subshapes being arranged hierarchically according toconstraints.
 5. The method of claim 4 wherein said identifying isperformed iteratively using said plurality of subshapes, beginning witha subshape having the most constraints, and ending when either instancesof all of said plurality of subshapes have been identified in saidtarget shape or no instances of one of said plurality of subshapes havebeen identified in said target.
 6. The method of claim 5 additionallycomprising applying a rule to said target shape based on saiddetermining.
 7. A method, comprising: defining an equivalent straightline shape for each curved line in a first shape; decomposing said firstshape into at least one subshape; identifying instances of parametrictransformations of said at least one subshape in a target shape;comparing any instances of a subshape corresponding to a straight lineshape found in said target shape to said curved line; and determining ifsaid first shape is present in said target shape based on saididentifying and said comparing.
 8. The method of claim 7 wherein saiddecomposing includes decomposing said first shape into a plurality ofsubshapes, said plurality of subshapes being arranged hierarchicallyaccording to constraints.
 9. The method of claim 8 wherein saididentifying and comparing are performed iteratively using said pluralityof subshapes, beginning with a subshape having the most constraints, andending when either instances of all of said plurality of subshapes havebeen identified in said target shape or no instances of one of saidplurality of subshapes have been identified in said target.
 10. Themethod of claim 9 additionally comprising applying a rule to said targetshape based on said determining.
 11. A memory device carrying a set ofinstructions which, when performed, execute a method comprising:decomposing a first shape into at least one subshape; identifyinginstances of said at least one subshape in a target shape; anddetermining if said first shape is present in said target shape based onsaid identifying.
 12. A memory device carrying a set of instructionswhich, when performed, execute a method comprising: defining anequivalent straight line shape for each curved line in a first shape;decomposing said first shape into at least one subshape; identifyinginstances of parametric transformations of said at least one subshape ina target shape; comparing any instances of a subshape corresponding to astraight line shape found in said target shape to said curved line; anddetermining if said first shape is present in said target shape based onsaid identifying and said comparing.
 13. An apparatus, comprising: meansfor decomposing a first shape into at least one subshape; means foridentifying instances of said at least one subshape in a target shape;and means for determining if said first shape is present in said targetshape in response to said means for identifying.
 14. An apparatus,comprising: means for defining an equivalent straight line shape foreach curved line in a first shape; means for decomposing said firstshape into at least one subshape; means for identifying instances ofparametric transformations of said at least one subshape in a targetshape; means for comparing any instances of a subshape corresponding toa straight line shape found in said target shape to said curved line;and means for determining if said first shape is present in said targetshape in response to said means for identifying and said means forcomparing.